package com.mlk.engSystem.controller;

import com.mlk.core.component.page.Pager;
import com.mlk.core.util.ServerResponse;
import com.mlk.engSystem.service.EngEmpRemainApplyService;
import com.mlk.engSystem.vo.EngSysEmpRemainApplyVO;
import com.mlk.engSystem.vo.EngSysEmpRemainLogVO;
import org.omg.PortableServer.Servant;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Controller
@RequestMapping("/api/emp/remain")
public class EngEmpRemainApplyController {

    @Resource
    private EngEmpRemainApplyService engEmpRemainApplyService;

    @RequestMapping("index")
    public String index(){
        return "engSystem/remainApply";
    }

    /**
     * 分页数据
     * @return
     */
    @RequestMapping("listPage")
    @ResponseBody
    public Pager listPage(EngSysEmpRemainApplyVO vo){
        return this.engEmpRemainApplyService.listPage(vo);
    }

    /**
     * 申请通过
     * @return
     */
    @RequestMapping("applyOK")
    @ResponseBody
    public ServerResponse applyOK(EngSysEmpRemainApplyVO vo){
        return this.engEmpRemainApplyService.applyOK(vo);
    }

    /**
     * 驳回申请
     * @param vo
     * @return
     */
    @RequestMapping("applyFail")
    @ResponseBody
    public ServerResponse applyFail(EngSysEmpRemainApplyVO vo){
        return this.engEmpRemainApplyService.applyFail(vo);
    }

}
